<?php
/**
 * Created by PhpStorm.
 * User: hml
 * Date: 2018/5/24
 * Time: 15:40
 */
echo '<meta charset="utf-8">';
$a = '我是变量';
$$a = '我是可变变量';
$b = '我是变量b';
$c = &$b;//传址赋值，类似通过快捷方式打开文件进修改，快捷方式对应的文件被修改了
$c = '我是变量C';
define('br','<br>');//定义常量
echo $a;
echo br;
echo $b;
echo br;
echo "$a ${$a}";
echo br;
var_dump(${$a});
echo br;
echo PHP_VERSION;//输出php版本
echo br;
echo PHP_OS;//输出系统类型
echo br;
unset($a);
if(isset($a))
    echo '变量$a存在';
else echo '变量$a不存在';
echo br;
if(defined('br'))
    echo '常量br存在';
else echo '常量br不存在';
echo br;
echo $_POST['time'];
echo br;
//echo $_GET['time'];
var_dump($_REQUEST);
?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>post提交</title>
</head>
<body>
    <form action="" method="post">
        <input type="text" name="time">
        <input type="submit" value="提交一下">
    </form>

</body>
</html>
